/*RemindInfoTemplate  */
import request from "/@/utils/request";
import download from "/@/utils/download.ts";

const RemindInfoTemplateApi = {

    getPageData(data: any) {
        return request({
            url: "/remindInfoTemplate/pageData",
            method: "post",
            data,
        });
    },
    getDetail(data: any) {
        return request({
            url: "/remindInfoTemplate/getDetail",
            method: "post",
            data,
        });
    },
    getRemindDicList(){
        return request({
            url: "/sysDic/searchByType?dicClass=remind",
            method: "get"
        })
    },
    save: (data: any) => {
        return request({
            url: "/remindInfoTemplate/save",
            method: "post",
            data,
        });
    },

    del: (data: any) => {
        return request({
            url: "/remindInfoTemplate/del",
            method: "post",
            data,
        });
    },

    updateStatus: (data: any) => {
        return request({
            url: "/remindInfoTemplate/updateStatus",
            method: "post",
            data,
        });
    },
    pageDataXls:(_searchParam: any,_xlsTitle: any) => {
                const param = new URLSearchParams();
        param.append("_searchParam",JSON.stringify(_searchParam))
        param.append("_xlsTitle",_xlsTitle)
        return request({
            url: "/remindInfoTemplate/pageDataXls",
            method: "post",
            responseType: 'blob',
            headersType: 'application/json;charset=UTF-8',
          params:param,
        }).then((res)=> {
            download(res)
        });
    },
};
export default RemindInfoTemplateApi;
